<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2019/3/16
  Time: 18:54
  To change this template use File | Settings | File Templates.
--%>
<!-- 推荐jsp放到web-inf内部 用户无法通过浏览器地址栏直接请求放在内部的jsp
必须通过servlet程序进行转发（forward）或定向（redirect）-->
<%--<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>

</body>
</html>--%>
<%@ page pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="BASE" value="${pageContext.request.contextPath}"/>
<html>
    <head>
        <title>客户管理</title>
    </head>
    <body>
        <h1>
            客户列表
        </h1>
        <table>
            <tr>
                <th>客户名称</th>
                <th>联系人</th>
                <th>电话号码</th>
                <th>邮箱地址</th>
                <th>操作</th>
            </tr>
            <c:forEach var="customer" items="${customerList}">
                <tr>
                    <td>${customer.name}</td>
                    <td>${customer.contact}</td>
                    <td>${customer.telephone}</td>
                    <td>${customer.email}</td>
                    <td>
                        <a href="${BASE}/customer_edit?id=${customer.id}">编辑</a>
                        <a href="${BASE}/customer_delete?id=${customer.id}">删除</a>
                    </td>
                </tr>
            </c:forEach>
        </table>
    </body>
</html>
